package com.kfm.springboot.autoconfig;

import com.kfm.springboot.autoconfig.custom.MyDataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class MyApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(MyApplication.class, args);

        MyDataSource bean = applicationContext.getBean(MyDataSource.class);
        System.out.println(bean);
    }
}
